package com.example.nacoscloudconsumer.utils;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Results {

    public static Map<String, Object> success(Object object){
        HashMap<String, Object> resultMap = new HashMap<>();
        resultMap.put("code", 200);
        resultMap.put("msg", "请求成功");
        resultMap.put("result", object);
        return resultMap;
    }

    public static Map<String, Object> error(int code, String msg){
        HashMap<String, Object> resultMap = new HashMap<>();
        resultMap.put("code", code);
        resultMap.put("msg", msg);
        return resultMap;
    }
}
